package com.pengxun.manager.enums;

/**
 * @author zhongzhu
 * @Title: kpd-platform
 * @Package com.pengxun.manager.enums
 * @Description:
 * @date 2019/4/1211:30
 */
public enum AgencyStatusEnum {
    DISABLE(0,"禁用"),

    ENABLE(1,"启用"),
    ;

    private Integer type;

    private String desc;

    AgencyStatusEnum(Integer type, String desc) {
        this.type = type;
        this.desc = desc;
    }

    public static AgencyStatusEnum getEnumByType(Integer type){
        AgencyStatusEnum[] enums = AgencyStatusEnum.values();
        for (AgencyStatusEnum agencyStatusEnum:enums){
            if(agencyStatusEnum.getType() == type){
                return agencyStatusEnum;
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}
